home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 October / CHIP Turkiye Ekim 2000.iso / prog / naps / 04 / setup.exe / Gnucleus / TitleTip.h < prev    next >
C/C++ Source or Header  |  2000-07-06  |  3KB  |  101 lines

  1. /********************************************************************************
  2.  
  3.     Gnucleus - A node application for the Gnutella network
  4.     Copyright (C) 2000 John Marshall
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 2 of the License.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18.  
  19.     For support, questions, comments, etc...
  20.     E-Mail: 
  21.         swabby@c0re.net
  22.     
  23.     Address:
  24.         21 Cadogan Way
  25.         Nashua, NH, USA 03062
  26.  
  27. ********************************************************************************/
  28.  
  29. #if !defined(AFX_TITLETIP_H__FB05F243_E98F_11D0_82A3_20933B000000__INCLUDED_)
  30. #define AFX_TITLETIP_H__FB05F243_E98F_11D0_82A3_20933B000000__INCLUDED_
  31.  
  32. #if _MSC_VER >= 1000
  33. #pragma once
  34. #endif // _MSC_VER >= 1000
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CTitleTip window
  38.  
  39. #define TITLETIP_CLASSNAME _T("GNUTitleTip")
  40.  
  41. /**
  42. * Titletips similar to tooltips. For ListView controls, TitleTips are used to
  43. * display text of those cells which are not wide enough to display the text
  44. * completely. TitleTips show up as soon as the mouse moves over the cell.
  45. */
  46.  
  47. class CTitleTip : public CWnd
  48. {
  49.     // Construction
  50. public:
  51.     CTitleTip();
  52.     virtual ~CTitleTip();
  53.     
  54.     // Attributes
  55. public:
  56.     
  57.     // Operations
  58. public:
  59.     
  60.     // Overrides
  61.     // ClassWizard generated virtual function overrides
  62.     //{{AFX_VIRTUAL(CTitleTip)
  63. public:
  64.     virtual BOOL PreTranslateMessage(MSG* pMsg);
  65.     virtual BOOL Create(CWnd* pParentWnd);
  66.     //}}AFX_VIRTUAL
  67.     
  68.     // Implementation
  69. public:
  70.     int  GetHorzSpace() {return m_iHorzSpace;}
  71.     void SetBackground(HBRUSH brshBackground);
  72.     void SetBkColor(COLORREF crColor);
  73.     void SetTextColor(COLORREF crColor);
  74.     void Show(CRect rectTitle, CString sTitleText, int xoffset = 0);
  75.  
  76.     static void RegisterWindowClass();
  77.     
  78. protected:
  79.     CWnd* m_pParentWnd;
  80.     CRect m_rectTitle;
  81.     HBRUSH m_brshBackground;
  82.     COLORREF m_clrBackground;
  83.     COLORREF m_clrText;
  84.     int m_iHorzSpace;
  85.  
  86.     // Generated message map functions
  87. protected:
  88.     //{{AFX_MSG(CTitleTip)
  89.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  90.     //}}AFX_MSG
  91.     DECLARE_MESSAGE_MAP()
  92. };
  93.  
  94. /////////////////////////////////////////////////////////////////////////////
  95.  
  96. //{{AFX_INSERT_LOCATION}}
  97. // Microsoft Developer Studio will insert additional declarations 
  98. // immediately before the previous line.
  99.  
  100. #endif // !defined(AFX_TITLETIP_H__FB05F243_E98F_11D0_82A3_20933B000000__INCLUDED_)
  101.